<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>性能分析报告</title>
    <style>
        body {
            margin: 0;
            padding: 20px;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            padding: 20px;
        }
        .header {
            text-align: center;
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid #eee;
        }
        .header h1 {
            color: #333;
            margin: 0;
            font-size: 24px;
        }
        .charts-container {
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }
        .chart {
            background-color: white;
            border-radius: 4px;
            padding: 15px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }
        .summary {
            margin-top: 20px;
            padding: 20px;
            background-color: #f8f9fa;
            border-radius: 4px;
        }
        .summary h2 {
            margin-top: 0;
            color: #333;
            font-size: 18px;
        }
        .summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }
        .summary-item {
            padding: 10px;
            background-color: white;
            border-radius: 4px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        }
        .summary-item h3 {
            margin: 0;
            font-size: 14px;
            color: #666;
        }
        .summary-item p {
            margin: 5px 0 0;
            font-size: 18px;
            font-weight: 500;
            color: #333;
        }
        .performance-warning {
            margin-top: 20px;
            padding: 15px;
            background-color: #fff3e0;
            border-left: 4px solid #ff9800;
            border-radius: 0 4px 4px 0;
        }
        .performance-warning h3 {
            margin: 0;
            color: #f57c00;
            font-size: 16px;
        }
        .performance-warning p {
            margin: 10px 0 0;
            color: #666;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>性能分析报告</h1>
        </div>
        
        <div class="charts-container">
            <!-- CHART_PLACEHOLDER -->
        </div>
        
        <div class="summary">
            <h2>性能指标摘要</h2>
            <div class="summary-grid">
                <div class="summary-item">
                    <h3>总执行时间</h3>
                    <p>{总执行时间}</p>
                </div>
                <div class="summary-item">
                    <h3>平均执行时间</h3>
                    <p>{平均执行时间}</p>
                </div>
                <div class="summary-item">
                    <h3>总内存使用</h3>
                    <p>{总内存使用}</p>
                </div>
                <div class="summary-item">
                    <h3>平均内存使用</h3>
                    <p>{平均内存使用}</p>
                </div>
            </div>
        </div>
        
        <div class="performance-warning">
            <h3>性能瓶颈警告 ({性能瓶颈数})</h3>
            <div id="bottlenecks">
                <!-- 由JavaScript动态填充 -->
            </div>
        </div>
    </div>
    
    <script>
        // 填充性能瓶颈信息
        const bottlenecks = {瓶颈详情};
        const bottlenecksContainer = document.getElementById('bottlenecks');
        
        bottlenecks.forEach(bottleneck => {
            const div = document.createElement('div');
            div.style.marginTop = '10px';
            div.style.padding = '10px';
            div.style.backgroundColor = 'white';
            div.style.borderRadius = '4px';
            
            div.innerHTML = `
                <p style="margin: 0; color: #333;">
                    <strong>节点:</strong> ${bottleneck.节点}<br>
                    <strong>类型:</strong> ${bottleneck.类型}<br>
                    <strong>描述:</strong> ${bottleneck.描述}<br>
                    <strong>优化建议:</strong> ${bottleneck.建议}
                </p>
            `;
            
            bottlenecksContainer.appendChild(div);
        });
    </script>
</body>
</html> 